package 建造者模式;

public class Client {
    public static void main(String[] args) {
        Director director = new Director();

        director.setBuilder(new CommonHouseBuilder());
        House commonHouse = director.constructHouse();// 可以改变制造产品的顺序。这个续需求顺序固定，只是值不一样
        System.out.println(commonHouse);

        director.setBuilder(new HighHouseBuilder());
        House highBuilding = director.constructHouse();// 可以改变制造产品顺序
        System.out.println(highBuilding);

        //House{basis='普通房子打地基5米就行', wall='普通房子墙高3米', roofed='普通房子没围墙'}
        //House{basis='别墅打地基10米就行', wall='别墅墙高10米', roofed='别墅有围墙'}
    }
}
